import {View} from 'react-native';
import {Icon} from 'tsun-smart-ui';
import IconMapping from '@/assets/fonts/icon-mapping.json';
interface LogoProps {
  className?: string;
  round?: boolean;
  size?: number;
  color: string;
  name: keyof typeof IconMapping;
  containerSize?: number;
  backgroundColor: string;
  radius?: number;
}
const Logo = ({
  className,
  round = true,
  size = 16,
  color,
  name,
  containerSize = 24,
  backgroundColor,
  radius = 4,
}: LogoProps) => {
  return (
    <View
      className={`flex-center ${className}`}
      style={{
        width: containerSize,
        height: containerSize,
        borderRadius: round ? containerSize / 2 : radius,
        backgroundColor: backgroundColor,
      }}>
      <Icon name={name} color={color} size={size} />
    </View>
  );
};

export default Logo;
